
/******************************************************************************\
|    Title:        	 TABLE E6: Regression Models for Lobbying Revenue	       |
|    Date:         	 July 2023	                                         	   |
|    Author:         Elisa Wirsching	      							       |
\******************************************************************************/


clear all
set more off, permanently
numlabel, add
set maxvar 32000


use lobbyist_yearly.dta, clear

reg log_adjlobrev_wgt i.switcher##i.yearsinceleaving if posttreat==1, cluster(stafferid)
summarize log_adjlobrev if e(sample)==1
estadd scalar ymean = r(mean) 
est store model1
estadd local fixed "No" , replace

reg log_adjlobrev_wgt i.switcher##i.yearsinceleaving i.year if posttreat==1, cluster(stafferid)
summarize log_adjlobrev if e(sample)==1
estadd scalar ymean = r(mean) 
est store model2
estadd local fixed "Yes" , replace

reg log_adjlobrev_wgt i.switcher##i.yearsinceleaving experience_imp daysworked committeestaff_everyear personalstaff_everyear senate_everyear majority_everyear minority_everyear dcoffice_everyear leaderofficestaff_everyear log_max_adjannual_pay i.year if posttreat==1, cluster(stafferid)
summarize log_adjlobrev if e(sample)==1
estadd scalar ymean = r(mean) 
est store model3
estadd local fixed "Yes" , replace
* NOTE (July 2023): a prior version of the manuscript had slightly different results in Column 3 because one variable had not yet been added to the equation (following a reviewer comment); this has been changed after conditional acceptance

esttab model1 model2 model3 using "TABLED6.csv", replace ///
	b(3) se(3) star(* .05 ** .01 *** 0.001) ///
	stats(ymean N r2, fmt(3 0 3) labels("Mean of DV"  "Observations" "R2"))  ///
	coeflabels(1.switcher "Switcher" 2.yearsinceleaving "Year since leaving Congress = 2" 3.yearsinceleaving "Year since leaving Congress = 3" 4.yearsinceleaving "Year since leaving Congress = 4" 5.yearsinceleaving "Year since leaving Congress = 5" 6.yearsinceleaving "Year since leaving Congress = 6" 7.yearsinceleaving "Year since leaving Congress = 7" 8.yearsinceleaving "Year since leaving Congress = 8" 9.yearsinceleaving "Year since leaving Congress = 9" 10.yearsinceleaving "Year since leaving Congress = 10" 11.yearsinceleaving "Year since leaving Congress = 11" 12.yearsinceleaving "Year since leaving Congress = 12" 1.switcher#2.yearsinceleaving "Switcher x Year since leaving Congress = 2" 1.switcher#3.yearsinceleaving "Switcher x Year since leaving Congress = 3" 1.switcher#4.yearsinceleaving "Switcher x Year since leaving Congress = 4" 1.switcher#5.yearsinceleaving "Switcher x Year since leaving Congress = 5" 1.switcher#6.yearsinceleaving "Switcher x Year since leaving Congress = 6" 1.switcher#7.yearsinceleaving "Switcher x Year since leaving Congress = 7" 1.switcher#8.yearsinceleaving "Switcher x Year since leaving Congress = 8" 1.switcher#9.yearsinceleaving "Switcher x Year since leaving Congress = 9" 1.switcher#10.yearsinceleaving "Switcher x Year since leaving Congress = 10" 1.switcher#11.yearsinceleaving "Switcher x Year since leaving Congress = 11" 1.switcher#12.yearsinceleaving "Switcher x Year since leaving Congress = 12" daysworked "Days worked" experience_imp "Hill experience" experience_sq "Hill experience sq." committeestaff2_everyear "Committee staff" personalstaff_everyear "Personal staff" senate_everyear "Senate staff" majority_everyear "Majority party staff" minority_everyear "Minority party staff" dcoffice_everyear "DC office staff" leaderofficestaff_everyear "Leadership office staff" log_max_adjannual_pay "Log max pay in Congress") ///
    label parentheses nogaps nolines noeqlines ///
    noomitted nodepvars nobaselevels indicate("Year FE = *.year") nonotes noconstant
	
